package com.ruoyi.project.mydy.serviceinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.serviceinfo.mapper.DlServiceInfoMapper;
import com.ruoyi.project.mydy.serviceinfo.domain.DlServiceInfo;
import com.ruoyi.project.mydy.serviceinfo.service.IDlServiceInfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 影院服务Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-07
 */
@Service
public class DlServiceInfoServiceImpl implements IDlServiceInfoService 
{
    @Autowired
    private DlServiceInfoMapper dlServiceInfoMapper;

    /**
     * 查询影院服务
     * 
     * @param id 影院服务主键
     * @return 影院服务
     */
    @Override
    public DlServiceInfo selectDlServiceInfoById(Long id)
    {
        return dlServiceInfoMapper.selectDlServiceInfoById(id);
    }

    /**
     * 查询影院服务列表
     * 
     * @param dlServiceInfo 影院服务
     * @return 影院服务
     */
    @Override
    public List<DlServiceInfo> selectDlServiceInfoList(DlServiceInfo dlServiceInfo)
    {
        return dlServiceInfoMapper.selectDlServiceInfoList(dlServiceInfo);
    }

    /**
     * 新增影院服务
     * 
     * @param dlServiceInfo 影院服务
     * @return 结果
     */
    @Override
    public int insertDlServiceInfo(DlServiceInfo dlServiceInfo)
    {
        dlServiceInfo.setCreateTime(DateUtils.getNowDate());
        return dlServiceInfoMapper.insertDlServiceInfo(dlServiceInfo);
    }

    /**
     * 修改影院服务
     * 
     * @param dlServiceInfo 影院服务
     * @return 结果
     */
    @Override
    public int updateDlServiceInfo(DlServiceInfo dlServiceInfo)
    {
        return dlServiceInfoMapper.updateDlServiceInfo(dlServiceInfo);
    }

    /**
     * 批量删除影院服务
     * 
     * @param ids 需要删除的影院服务主键
     * @return 结果
     */
    @Override
    public int deleteDlServiceInfoByIds(String ids)
    {
        return dlServiceInfoMapper.deleteDlServiceInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除影院服务信息
     * 
     * @param id 影院服务主键
     * @return 结果
     */
    @Override
    public int deleteDlServiceInfoById(Long id)
    {
        return dlServiceInfoMapper.deleteDlServiceInfoById(id);
    }
}
